<html><head><title>ComposeJSON</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">ComposeJSON()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result$ = <font color="#3A3966"><b>ComposeJSON</b></font>(#JSON [, Flags])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Compose the given JSON data into a string. A string can be parsed 
back into JSON data using the <a href="parsejson.html">ParseJSON()</a> function. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#JSON</i></td>
<td width="90%"> 
The JSON to compose. 

</td></tr>
<tr><td><i>Flags (optional)</i></td>
<td> 
If set to <font color="#924B72">#PB_JSON_PrettyPrint</font>, the composed string will 
contain additional newline and whitespace for better readability. The extra 
whitespace is not significant to the JSON format. The output will have the 
same meaning to a JSON reader with or without this flag. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

The JSON data as a string. 

</blockquote><p><b>Remarks</b></p><blockquote>

The output string has the string format of the executable (Ascii or Unicode). 
JSON is generally encoded in UTF-8, so when writing the result string to a file 
or sending it to another application, it is advised to convert the string to UTF-8 
before doing so. 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <font color="#3A3966">CreateJSON</font>(0)
    Person =<font color="#3A3966"> SetJSONObject</font>(<font color="#3A3966">JSONValue</font>(0))
<font color="#3A3966">    SetJSONString</font>(<font color="#3A3966">AddJSONMember</font>(Person, &quot;FirstName&quot;), &quot;John&quot;)
<font color="#3A3966">    SetJSONString</font>(<font color="#3A3966">AddJSONMember</font>(Person, &quot;LastName&quot;), &quot;Smith&quot;)
<font color="#3A3966">    SetJSONInteger</font>(<font color="#3A3966">AddJSONMember</font>(Person, &quot;Age&quot;), 42)
    
    <b><font color="#3A3966">Debug</font></b> <font color="#3A3966">ComposeJSON</font>(0, <font color="#924B72">#PB_JSON_PrettyPrint</font>)
  <b><font color="#3A3966">EndIf</font></b>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="savejson.html">SaveJSON()</a>, <a href="exportjson.html">ExportJSON()</a>, <a href="exportjsonsize.html">ExportJSONSize()</a>, <a href="parsejson.html">ParseJSON()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=clearjsonmembers.html>ClearJSONMembers()</a> - <a href="index.html">Json Index</a> - <a href="createjson.html">CreateJSON()</a> -><br><br>

</body></html>